package com.hutu.model.biz;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.sql.Timestamp;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 字段信息
 * </p>
 *
 * @author admin
 * @since 2023-07-15
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("ht_column")
@ApiModel(value = "Column对象", description = "字段信息")
public class Column implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("字段名称")
    @TableField("column_name")
    private String columnName;

    @ApiModelProperty("字段类型")
    @TableField("column_type")
    private String columnType;

    @ApiModelProperty("字段注释")
    @TableField("column_comment")
    private String columnComment;

    @ApiModelProperty("是否主键")
    @TableField("primary_key")
    private Integer primaryKey;

    @ApiModelProperty("是否非空")
    @TableField("not_null")
    private Integer notNull;

    @ApiModelProperty("默认值")
    @TableField("default_value")
    private String defaultValue;

    @ApiModelProperty("是否自动递增")
    @TableField("auto_increment")
    private Integer autoIncrement;

    @ApiModelProperty("附加条件")
    @TableField("on_update")
    private String onUpdate;

    @ApiModelProperty("创建人")
    @TableField(value = "create_user", fill = FieldFill.INSERT)
    private Integer createUser;

    @ApiModelProperty("创建人姓名")
    @TableField(value = "create_user_name", fill = FieldFill.INSERT_UPDATE)
    private String createUserName;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Timestamp createTime;

    @ApiModelProperty("逻辑删除，0未删除，1已删除")
    @TableField("is_deleted")
    @TableLogic
    private Integer isDeleted;

    @ApiModelProperty("更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Timestamp updateTime;

    @ApiModelProperty("表ID")
    @TableField("table_id")
    private Integer tableId;

    @ApiModelProperty("表名称")
    @TableField("table_name")
    private String tableName;

    @ApiModelProperty("实体")
    @TableField("is_entity")
    private Integer isEntity;

    @ApiModelProperty("Vo")
    @TableField("is_vo")
    private Integer isVo;

    @ApiModelProperty("Req")
    @TableField("is_req")
    private Integer isReq;

    @ApiModelProperty("Dto")
    @TableField("is_dto")
    private Integer isDto;

    @ApiModelProperty("必填")
    @TableField("is_need")
    private Integer isNeed;

    @ApiModelProperty("Excel")
    @TableField("is_excel")
    private Integer isExcel;

    @ApiModelProperty("dict")
    @TableField("dict")
    private String dict;

    @ApiModelProperty("sensitiveRule")
    @TableField("sensitive_rule")
    private String sensitiveRule;

    @ApiModelProperty("默认值")
    @TableField("mrz")
    private String mrz;
}
